<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>姓-名 案例1</title>
    <script src="js/vue.js"></script>
</head>

<body>
    <div id="root">
        <input type="text" name="" id="" v-model="firstName"> <br />
        <input type="text" name="" id="" v-model="lastName"> <br />
        <span>{{firstName}}-{{lastName}}</span>
    </div>
</body>
<script>
    new Vue({
        el: "#root",
        data() {
            return {
                firstName: "张",
                lastName: "三"
            }
        }
    })
</script>

</html>